import { defHttp } from '/@/utils/http/axios';
import { getMenuListResultModel } from './model/menuModel';
import { GetUserInfoModel } from './model/userModel';
enum Api {
  GetMenuTreeList = '/sysAuthAbout/getMenuTreeListCurrent',
  GetMenuList = '/sysAuthAbout/getMenuListCurrent',
}
  
/**
 * @description: Get user menu based on id
 */

export const getMenuTreeList = (info: GetUserInfoModel) => {
  return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuTreeList, params: { _userType: info.userType,roleAutoId:info.roleAutoId}, });
};

export const getMenuList = (info: GetUserInfoModel) => {
  return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList, params: { _userType: info.userType}, });
};
